<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<html>
	<body>
		<h1 class="pagetitle">
			Order Detail
		</h1>
		<div class="column1-unit">
			<table class="bigtable">
				<caption align="left" style="padding: 0 0 0 5px">销售价格:<s:property value="order.price"/></caption>
				<tr>
					<th width="100">
						料号
					</th>
					<th width="200">
						料号介绍
					</th>
					<th width="100">
						单价
					</th>
					<th width="100">
						数量
					</th>
					<th>
						详情
					</th>
				</tr>
				<s:iterator value="order.orderSubList">
				<tr>
					<td>
						<s:property value="pn.pn"/>
					</td>
					<td>
						<s:property value="pn.remark"/>
					</td>
					
					<td>
						<s:property value="price"/>
					</td>
					<td width="100">
						<s:property value="quantity"/>
					</td>
					<td>
						<s:iterator value="pn.partsList">
							<s:property value="name"/>---<s:property value="quantity"/><br>
						</s:iterator>
					</td>
				</tr>
				</s:iterator>
			</table>
			
			<table class="formtable">
				<tr>
					<th width="100">
						客户
					</th>
					<td><s:property value="customer.name"/></td>
				</tr>
				<tr>
					<th width="100">
						订单状态
					</th>
					<td><s:text name="@com.ac.util.DataStore@getStatusMap()[%{order.status}]"/></td>
				</tr>
				<tr>
					<th width="100">
						订单备注
					</th>
					<td>
						<s:property value="order.remark"/>
					</td>
				</tr>
			</table>
			
			<table class="formtable">
				<caption align="left" style="padding: 0 0 0 5px">成本:<s:property value="order.cost"/></caption>
				<s:iterator value="order.partsPriceQuantityList">
				<tr>
					<th width="100">
						<s:property value="name"/>
					</th>
					<td>
						<s:property value="quantity"/>
					</td>
					<td>
						<s:property value="price"/>
					</td>
				</tr>
				</s:iterator>
			</table>
			
			<s:if test="order.status == 1">
				<a href="order!approve.action?approve=1&order.id=${order.id}">Agree</a>
				<a href="order!approve.action?approve=0&order.id=${order.id}">Reject</a>
			</s:if>
		</div>

	</body>
</html>